package me.zhengjie.utils;

import me.zhengjie.dto.Actions;
import me.zhengjie.dto.Tasks;

import java.util.ArrayList;
import java.util.List;

public class Test1 {

    public static Tasks makeTasks(String fromPoint, String toPoint, String taskId,String taskType){
        List<String> target = new ArrayList<>();
        target.add(fromPoint);
        target.add(toPoint);

        Actions a1 = new Actions(fromPoint,"GET");
        Actions a2 = new Actions(toPoint,"PUT");

        List<Actions> actions = new ArrayList<>();
//        actions.add(a1);
//        actions.add(a2);

        //configId
        String configId = taskType;

        Tasks task = new Tasks();
        task.setTaskId(taskId);
        task.setTargets(target);
        task.setConfigId(configId);
        task.setActions(actions);

        return task;
    }

    public static void test1(){

    }

}
